import { useState } from "react";
import LazyLoad from "react-lazyload";
import styles from './index.less';
// ../../assets

const LazyImg = (props) => {
    const imgList = new Array(6).fill(0);
    return(
       <div className={styles.lazy_root}>
           <div>
               <h1>题库</h1>

           </div>
           {
               imgList.map((item, index) => {
                return(<div key={index.toString()}>
                    <LazyLoad offset={50} height={200} once>
                    <img alt='' src={require(`~/banner/img${index + 1}.jpeg`)} />
                    </LazyLoad>
                    </div>)
               })
           }
       </div>
    )
}

export default LazyImg